Optimal. Leaf size=97 \[ -\frac{(a B+A b) \sin ^4(c+d x)}{4 d}-\frac{(a A-b B) \sin ^3(c+d x)}{3 d}+\frac{(a B+A b) \sin ^2(c+d x)}{2 d}+\frac{a A \sin (c+d x)}{d}-\frac{b B \sin ^5(c+d x)}{5 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.115297, antiderivative size = 97, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.069, Rules used = {2837, 772} \[ -\frac{(a B+A b) \sin ^4(c+d x)}{4 d}-\frac{(a A-b B) \sin ^3(c+d x)}{3 d}+\frac{(a B+A b) \sin ^2(c+d x)}{2 d}+\frac{a A \sin (c+d x)}{d}-\frac{b B \sin ^5(c+d x)}{5 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2837
Rule 772
Rubi steps
\begin{align*} \int \cos ^3(c+d x) (a+b \sin (c+d x)) (A+B \sin (c+d x)) \, dx &=\frac{\operatorname{Subst}\left (\int (a+x) \left (A+\frac{B x}{b}\right ) \left (b^2-x^2\right ) \, dx,x,b \sin (c+d x)\right )}{b^3 d}\\ &=\frac{\operatorname{Subst}\left (\int \left (a A b^2+b (A b+a B) x-(a A-b B) x^2-\frac{(A b+a B) x^3}{b}-\frac{B x^4}{b}\right ) \, dx,x,b \sin (c+d x)\right )}{b^3 d}\\ &=\frac{a A \sin (c+d x)}{d}+\frac{(A b+a B) \sin ^2(c+d x)}{2 d}-\frac{(a A-b B) \sin ^3(c+d x)}{3 d}-\frac{(A b+a B) \sin ^4(c+d x)}{4 d}-\frac{b B \sin ^5(c+d x)}{5 d}\\ \end{align*}
Mathematica [A] time = 0.250193, size = 80, normalized size = 0.82 \[ \frac{\sin (c+d x) \left (-15 (a B+A b) \sin ^3(c+d x)-20 (a A-b B) \sin ^2(c+d x)+30 (a B+A b) \sin (c+d x)+60 a A-12 b B \sin ^4(c+d x)\right )}{60 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.059, size = 88, normalized size = 0.9 \begin{align*}{\frac{1}{d} \left ( Bb \left ( -{\frac{\sin \left ( dx+c \right ) \left ( \cos \left ( dx+c \right ) \right ) ^{4}}{5}}+{\frac{ \left ( 2+ \left ( \cos \left ( dx+c \right ) \right ) ^{2} \right ) \sin \left ( dx+c \right ) }{15}} \right ) -{\frac{Ab \left ( \cos \left ( dx+c \right ) \right ) ^{4}}{4}}-{\frac{aB \left ( \cos \left ( dx+c \right ) \right ) ^{4}}{4}}+{\frac{aA \left ( 2+ \left ( \cos \left ( dx+c \right ) \right ) ^{2} \right ) \sin \left ( dx+c \right ) }{3}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.989765, size = 108, normalized size = 1.11 \begin{align*} -\frac{12 \, B b \sin \left (d x + c\right )^{5} + 15 \,{\left (B a + A b\right )} \sin \left (d x + c\right )^{4} + 20 \,{\left (A a - B b\right )} \sin \left (d x + c\right )^{3} - 60 \, A a \sin \left (d x + c\right ) - 30 \,{\left (B a + A b\right )} \sin \left (d x + c\right )^{2}}{60 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.41141, size = 174, normalized size = 1.79 \begin{align*} -\frac{15 \,{\left (B a + A b\right )} \cos \left (d x + c\right )^{4} + 4 \,{\left (3 \, B b \cos \left (d x + c\right )^{4} -{\left (5 \, A a + B b\right )} \cos \left (d x + c\right )^{2} - 10 \, A a - 2 \, B b\right )} \sin \left (d x + c\right )}{60 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 2.23447, size = 128, normalized size = 1.32 \begin{align*} \begin{cases} \frac{2 A a \sin ^{3}{\left (c + d x \right )}}{3 d} + \frac{A a \sin{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{d} - \frac{A b \cos ^{4}{\left (c + d x \right )}}{4 d} - \frac{B a \cos ^{4}{\left (c + d x \right )}}{4 d} + \frac{2 B b \sin ^{5}{\left (c + d x \right )}}{15 d} + \frac{B b \sin ^{3}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{3 d} & \text{for}\: d \neq 0 \\x \left (A + B \sin{\left (c \right )}\right ) \left (a + b \sin{\left (c \right )}\right ) \cos ^{3}{\left (c \right )} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.27918, size = 135, normalized size = 1.39 \begin{align*} -\frac{12 \, B b \sin \left (d x + c\right )^{5} + 15 \, B a \sin \left (d x + c\right )^{4} + 15 \, A b \sin \left (d x + c\right )^{4} + 20 \, A a \sin \left (d x + c\right )^{3} - 20 \, B b \sin \left (d x + c\right )^{3} - 30 \, B a \sin \left (d x + c\right )^{2} - 30 \, A b \sin \left (d x + c\right )^{2} - 60 \, A a \sin \left (d x + c\right )}{60 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]